package com.javaee.ch09.web;


import com.javaee.ch09.common.response.ResultVo;
import com.javaee.ch09.dao.BookDao;
import com.javaee.ch09.entity.Book;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Min;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@Controller
@RequestMapping("/")
public class Router {
    @GetMapping("/vue3_"+"{filename}")
    public String vue(@PathVariable String filename) {
        String router="/vue3/vue3_"+filename+".html";
        return router;
    }

    @GetMapping("/axios"+"{filename}")
    public String vue2(@PathVariable String filename) {
        String router="/axios/axios"+filename+".html";
        return router;
    }

    @GetMapping("/book/list")
    public String vue3() {
        String router="/book/book-list.html";
        return router;
    }

    @GetMapping("/book/form")
    public String vue4() {
        String router="/book/book-form.html";
        return router;
    }

    @GetMapping("/book/detail")
    public String vue5() {
        String router="/book/book-detail.html";
        return router;
    }

    @GetMapping("/reader/list")
    public String vue6() {
        String router="/reader/reader-list.html";
        return router;
    }

    @GetMapping("/reader/form")
    public String vue7() {
        String router="/reader/reader-form.html";
        return router;
    }

    @GetMapping("/reader/detail")
    public String vue8() {
        String router="/reader/reader-detail.html";
        return router;
    }
}
